#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pii pair<int,int>
#define pb push_back
#define vec vector<int>
#define y1 y_____hahahaha_____1

using namespace std;

typedef long long ll;
typedef double db;
typedef unsigned long long ull;
typedef long double ldb;

int read(){int x = 0,sgn = 1;char ch = getchar();for(;!isdigit(ch);ch = getchar()) if(ch == '-') sgn = -1;for(;isdigit(ch);ch = getchar()) x = (x << 1) + (x << 3) + (ch ^ 48); return x * sgn;}

const int N = 1010;

db Rand(){return (db) rand() / RAND_MAX;}

int n;
db T = 100000,ansx,ansy,x[N],y[N],w[N],ans,nowx,nowy;

db calc(db cx,db cy){
	db res = 0;
	for(int i = 1;i <= n;i++){
		db dx = x[i] - cx,dy = y[i] - cy;
		res = res + sqrt(dx * dx + dy * dy) * w[i];
	}
	if(res < ans) ans = res,ansx = cx,ansy = cy;
	return res;
}

void simulateAl(){
	T = 100000; nowx = ansx; nowy = ansy;
	while(T > 0.0001){
		db nx = nowx + (Rand() * 2 - 1) * T;
		db ny = nowy + (Rand() * 2 - 1) * T;
		db delta = calc(nx,ny) - calc(nowx,nowy);
		if(exp(-delta / T) > Rand()) nowx = nx,nowy = ny;
		T = T * 0.97;
	}
	for(int i = 1;i <= 1000;i++) calc(ansx + (Rand() * 2 - 1) * T, ansy + (Rand() * 2 - 1) * T);
}

int main(){
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	srand(time(NULL));
	n = in; for(int i = 1;i <= n;i++) x[i] = in,y[i] = in,w[i] = in,ansx += x[i],ansy += y[i];
	ansx /= n; ansy /= n; ans = calc(ansx,ansy);
	clock_t st = clock();
	while((clock() - st) / CLOCKS_PER_SEC < 0.75) simulateAl(); printf("%.3lf %.3lf\n",ansx,ansy);
	return 0;
}
